<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>nth-of-type</title>
</head>
<style type="text/css">
	*{
		margin: 0;
		padding: 0;
	}
	body div:nth-of-type(1){
		color: red;
	}
</style>
<body>
<!-- nth-of-type nth-child -->
<div>第1个DIV</div>
<div>第2个DIV</div>
<div>第3个DIV</div>
<p>第1个P</p>
<p>第2个P</p>
</body>
</html>